how to find complimentary function